package com.zx.map.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.zx.map.dao.model.TodoTask;
import com.zx.map.dao.model.TodoTaskExample;

public interface TodoTaskDao {

	/**
	 * 新增
	 * 
	 * @param TodoTask
	 * @return
	 * @throws DataAccessException
	 */
	public Integer add(TodoTask todoTask) throws DataAccessException;

	/**
	 * 更新
	 * 
	 * @param TodoTask
	 * @return
	 * @throws DataAccessException
	 */
	public Integer update(TodoTask todoTask) throws DataAccessException;

	/**
	 * 删除
	 * 
	 * @param TodoTask
	 * @throws DataAccessException
	 */
	public void delete(TodoTask todoTask) throws DataAccessException;

	/**
	 * 分页查询
	 * 
	 * @param pageSize
	 * @param pageBegin
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public List<TodoTask> getPageByExample(int pageSize, int pageBegin,
			TodoTaskExample example) throws DataAccessException;
	/**
	 * 根据Model查找List
	 * @param pageSize
	 * @param pageBegin
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public List<TodoTask> getListByExample(TodoTaskExample example) throws DataAccessException;
	
	/**
	 * 查找条数
	 * 
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public int countByExample(TodoTaskExample example) throws DataAccessException;
	/**
	 * 根据单Key查找Model
	 * 
	 * @param example
	 * @return
	 * @throws DataAccessException
	 */
	public TodoTask selectByPrimaryKey(Integer key) throws DataAccessException;
}